package satir.testcase.cell.factory;


import junit.framework.TestCase;
import junitx.util.PrivateAccessor;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import satir.card.Deck;
import satir.cell.Cell;
import satir.cell.factory.SayCellFactory;

public class SayCellFactory_createCell_1 extends TestCase{

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	/**
	 * Step number : 1
	 * Goal: Create a Say Cell
	 */
	@Test
	public void testCreateSayCell() {
		SayCellFactory scf = new SayCellFactory();
		scf.setCellDetail(7, 5, '*', '|', new Deck());
		Cell sc = scf.createCell();
		try {
			String output = ((Integer)PrivateAccessor.getField(sc, "width")).toString();
			output += ((Integer)PrivateAccessor.getField(sc, "height")).toString();
			output += ((Character)PrivateAccessor.getField(sc, "borderHorizonal")).toString();
			output += ((Character)PrivateAccessor.getField(sc, "borderVertical")).toString();
			output += ((String)PrivateAccessor.getField(sc, "cellLabel"));
			assertEquals("75*|Say", output);
		} catch (NoSuchFieldException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
